Socket
Socket
Sign inDemoInstall

remark-comment-config

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-comment-config

remark plugin to configure it with comments


Version published
Weekly downloads
4.4K
increased by18.81%
Maintainers
2
Weekly downloads
 
Created
Source

remark-comment-config

Build Coverage Downloads Size Sponsors Backers Chat

remark plugin to configure it with comments.

Install

npm:

npm install remark-comment-config

Use

Say we have the following file, example.md:

<!--remark commonmark bullet="*"-->

1) Commonmark list (this is a parse setting)

- List item (this is a stringify setting)

And our script, example.js, looks as follows:

var vfile = require('to-vfile')
var remark = require('remark')
var commentConfig = require('remark-comment-config')

remark()
  .use(commentConfig)
  .process(vfile.readSync('example.md'), function(err, file) {
    if (err) throw err
    console.log(String(file))
  })

Now, running node example yields:

<!--remark commonmark bullet="*"-->

1.  Commonmark list (this is a parse setting)

*   List item (this is a stringify setting)

API

remark().use(commentConfig)

Plugin to configure remark with comments. Parses comments, such as <!--remark foo="bar" baz-->, and passes the “attributes” as parse and stringify.

This is essentially the same as remark-yaml-config, except that comments are invisible when rendering to HTML (such as on GitHub).

Security

Use of remark-comment-config can change how Markdown is parsed or compiled. If the Markdown is user provided, this may open you up to a cross-site scripting (XSS) attack.

Contribute

See contributing.md in remarkjs/.github for ways to get started. See support.md for ways to get help.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

License

MIT © Titus Wormer

Keywords

FAQs

Package last updated on 22 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc